<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>v-on:click点击事件</title>
    <script type="text/javascript" src="static/vue.min.js"></script>
</head>
<body>
<div id="click">
    {{message}} <br>
    <button @click="fun('good')">点我试试</button>
</div>
<script>
    new Vue({
       el:"#click",
       data:{
           message:"hello world"
       },
       methods:{
           fun:function (msg) {
            this.message=msg;
           }
       }
    });
</script>
     <!--v-on:事件名称=方法()
     等价于
      @事件名称=方法()-->
<div id="app">
    {{message}} <br>
    <button v-on:click="func('hello world')">点我试试</button>
</div>

<script>

    new Vue({
        el:"#app",//el:全称Expression Language:vue表达式语言，指定vue控制的区域
        data:{    //封装数据的Model
            message:"你瞅啥?"
        },
        methods:{
            func:function (msg) {
                this.message=msg;
            }
        }
    });
</script>
</body>
</html>